using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using F8Framework.Core;
using F8Framework.Launcher;
using UnityEngine.SceneManagement;

public class UIStartMenu : BaseView
{
    // Awake
    protected override void OnAwake()
    {
        btn_Single_btn.onClick.AddListener(()=>
        {
            Close();
            FF8.Procedure.RunProcedureNode<GameProcedure>();
        });
    }
    
    // 参数传入，每次打开UI都会执行
    protected override void OnAdded(int uiId, object[] args = null)
    {
        
    }
    
    // Start
    protected override void OnStart()
    {
        
    }
    
    protected override void OnViewTweenInit()
    {
        //transform.localScale = Vector3.one * 0.7f;
    }
    
    // 自定义打开界面动画
    protected override void OnPlayViewTween()
    {
        //transform.ScaleTween(Vector3.one, 0.1f).SetEase(Ease.Linear).SetOnComplete(OnViewOpen);
    }
    
    // 打开界面动画完成后
    protected override void OnViewOpen()
    {
        
    }
    
    // 删除之前，每次UI关闭前调用
    protected override void OnBeforeRemove()
    {
        
    }
    
    // 删除，UI关闭后调用
    protected override void OnRemoved()
    {
        
    }
    
    // 自动获取组件（自动生成，不能删除）
	[SerializeField] private UnityEngine.UI.Button btn_Single_btn;
	[SerializeField] private UnityEngine.UI.Button btn_Match_btn;
	[SerializeField] private UnityEngine.UI.Button btn_Friend_btn;
	[SerializeField] private UnityEngine.UI.Text TextLegacy_TextLegacy;
	[SerializeField] private UnityEngine.UI.Text TextLegacy_TextLegacy_2;
	[SerializeField] private UnityEngine.UI.Text TextLegacy_TextLegacy_3;

#if UNITY_EDITOR
	protected override void SetComponents()
	{
		btn_Single_btn = transform.Find("btn_Single").GetComponent<UnityEngine.UI.Button>();
		btn_Match_btn = transform.Find("btn_Match").GetComponent<UnityEngine.UI.Button>();
		btn_Friend_btn = transform.Find("btn_Friend").GetComponent<UnityEngine.UI.Button>();
		TextLegacy_TextLegacy = transform.Find("btn_Single/Text (Legacy)").GetComponent<UnityEngine.UI.Text>();
		TextLegacy_TextLegacy_2 = transform.Find("btn_Match/Text (Legacy)").GetComponent<UnityEngine.UI.Text>();
		TextLegacy_TextLegacy_3 = transform.Find("btn_Friend/Text (Legacy)").GetComponent<UnityEngine.UI.Text>();
	}
#endif
	// 自动获取组件（自动生成，不能删除）
}